// Given an array of integers, return indices of the two numbers such that they add up to a specific target.

// You may assume that each input would have exactly one solution.

var twoSum = function(nums, target) {
    var indices  = [],
        len = nums.length,
        index = 0,
        i;
    for(i = 0; i < len; i++){
        index = nums.indexOf(target - nums[i]);
        if(index !== -1 && index != i){
            indices.push(i,index);
            return indices;
        }
    }
};